{% extends 'checkout/details.html' %}

{% load bootstrap_form from bootstrap3 %}
{% load staticfiles %}
{% load i18n %}

{% block title %}{% trans "Create password" context "Checkout create password page title" %} — {{ block.super }}{% endblock %}


{% block content %}
  <div class="row checkout__thankyoupage">
    <div class="col-xl-10 offset-xl-1">
      <img class="checkout__thankyoupage__parrot" src="{% static 'images/parrot.png' %}"
           srcset="{% static 'images/parrot.png' %} 1x, {% static 'images/parrot2x.png' %} 2x">
      <h1>{% blocktrans trimmed with order_url=order.get_absolute_url context "Checkout title" %}
          Thank you for your <a href="{{ order_url }}">order</a>!
      {% endblocktrans %}</h1>

        <p>{% blocktrans trimmed with order_url=order.get_absolute_url context "Checkout text" %}
          We've sent a confirmation email with details to <span>{{ email }}</span>.<br>
          If any problems or questions contact us.
        {% endblocktrans %}</p>
      <div class="row checkout__thankyoupage__form">
        <div class="col-md-6 push-md-6">
          {% if login_form is not None %}
            <p>{% blocktrans trimmed context "Checkout text" %}
              It looks like you already are our customer! <br>
              Please log in to connect order with your account.
            {% endblocktrans %}</p>
            {% url "order:connect-order-with-user" token=order.token as attach_url %}
            {% include "account/partials/login_form.html" with redirect_field_value=attach_url form=login_form %}
          {% else %}
            <form method="post" action="" novalidate>
              {% csrf_token %}
              <fieldset>
                <h3>{% trans "Why not to create an account" context "Checkout title" %}</h3>
                <p>{% blocktrans trimmed %}
                    Make your shopping experience even better!
                    Save your shipping and payment details for faster checkout.
                {% endblocktrans %}</p>
                {% bootstrap_form form %}
              </fieldset>
              <div class="row login__btn-group">
                <div class="col-12">
                  <button class="btn primary">
                    {% trans "Create an account" context "Checkout primary action" %}
                  </button>
                </div>
              </div>
            </form>
          {% endif %}
        </div>
        <div class="col-md-6 pull-md-6">
          <h3>...</h3>
          <img class="checkout-pirate" src="{% static 'images/pirate-checkout.png' %}"
               srcset="{% static 'images/pirate-checkout.png' %} 1x, {% static 'images/pirate-checkout2x.png' %} 2x">
          <p><a href="{% url 'checkout:index' %}" class="btn secondary">
              {% trans "Continue shopping" context "Checkout secondary action" %}
          </a></p>
        </div>
      </div>
    </div>
  </div>
{% endblock %}
